<?php
/**
 * Created by PhpStorm.
 * User: hwy
 * Date: 2020/6/21
 * Time: 17:34
 */

namespace App\Http\Controllers\Index;


use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class UserController extends Controller
{
    public function stocksLogin()
    {
//        dd(session('stocks_key'));
        return view('index.user.stocks_login');
    }

    public function stocksLoginHandle(Request $request)
    {
        $s_pwd = $request->s_pwd;

        if ($s_pwd == '122333') {
            session([ 'stocks_key' => $s_pwd ]);

            return redirect(route('article_stock.index'));
        }
        session([ 'stocks_key' => null ]);
        return redirect(route('user.stocks_login'));

    }

}
